package com.bit.ioc.component;

import com.bit.ioc.model.Student;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Primary;
import org.springframework.stereotype.Component;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User:
 * Date: 2025-11-19
 * Time: 16:43
 */
@Component
public class StudentComponent {

//    @Bean(name = {"se", "s4"})
//    @Primary
    @Bean(value = {"se", "s4"})
    public Student s1(){
        return new Student("zhangsan", 11);
    }

    @Bean
    public Student s2(){
        return new Student("lisi", 18);
    }
}
